#include <iostream>
#include <string>
#include <memory>
#include <jsoncpp/json/json.h>

// 此文件任务
// 1. 完成请求和应答的序列化和反序列化
// 3. 解决TCP粘报问题--读取报文不完整
// 2. 请求计算的数据初始化
namespace protocol_ns
{
    class request
    {
    public:
        request()
        {
        }
        request()
        {
        }
        bool serialize()
        {
        }
        bool deserialize()
        {
        }
    private:
        int _x;
        int _y;
        int _operation;
    };
    class response
    {
    public:
        response()
        {
        }
        ~response()
        {
        }
        bool serialize()
        {
        }
        bool deserialize()
        {
        }

    private:
        int _result;
        int _code;
    };
    class factory
    {
    public:
        factory()
        {
        }
        std::shared_ptr<request> build_request()
        {
        }
        std::shared_ptr<response> build_response()
        {
        }
        factory()
        {
        }

    private:
        std::string _operation; //
    };
}
